-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[TF2] Added convar to display high-res backpack icons in econ UI + item importer futureproofing #1767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[TF2] Added convar to display high-res backpack icons in econ UI + item importer futureproofing #1767
Conversation
|
This seems uncecessary as Valve could fix this with some simple edits to the HUD (adding "inventory_image_type" "1" under "itemmodelpanel" in several files). |
I don't think it's unnecessary if it lets users get HD icons without having to edit their HUD files. This PR retools a bool Valve had previously coded in to do exactly this functionality and makes it a convar toggle for players that want it (ex. high resolution players). |
I'm saying Valve could fix it themselves, not that users have to. |
|
I did the PR for them just in case. They don't have to necessarily add my approach if they choose to implement it themselves. |
Isn't like the whole point of pull requests is to submit fixes/improvements |
|
These issues feel fixable if Valve wishes to add such an option. Mannpower icons use a gameplay particle as their icon and currently have some issues in live TF2 (some icons get truncated as they were not designed around the thumbnail safespace. I will work on a submission to patch up item vmts that need it. EDIT: Updated VMTs for all 2776 "_large" icons that need the necessary changes, as well as a script to generate these locally, have been submitted to the Steam Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=3649586055 |
|
Item importer code has been updated to futureproof future cosmetics' large icons. It should now generate the VMT file with the required parameters. |

This PR adds a new convar (tf_use_large_backpack_icons) to display high-resolution backpack icons across all econ-related UI (backpack, loadout slots, inspect panel).
To properly support this feature, game code has also been updated to futureproof large backpack icon VMTs generated through the item importer so that they can be properly grayed out when unselectable.
FOR VALVE
A known issue is that many items (mainly workshop items submitted through importer) currently do not have their large icon VMTs set up to support this:

Affected VMTs will need to be updated with the following text:
"UnlitGeneric"
{
"$baseTexture" "path to the backpack icon here"
$translucent 1
$vertexcolor 1 // this line is missing for "_large" backpack icons
}
Game code has been updated in this PR to auto-generate large backpack icon VMTs with all necessary parameters when generated from the item importer. This should prevent the issue from happening with future cosmetic icons.
The updated VMT files, as well as the script used to generate these, can also be found here: updated_vmts_for_hires_icons.zip
Steam Workshop copy: https://steamcommunity.com/sharedfiles/filedetails/?id=3649586055
An included script can be used to locally generate updated VMTs for ALL backpack icons that require it (2776 total). Generated files will automatically be stored in their respective folders.
backpack_vmt_patcher.py
You will need to execute it from "/tf" folder, script will hook onto "materials" folder and generate updated copies of all "_large" icon files in backpack folder that require the vmt changes.
It should fix some large icons not graying out in ui when needed:
